package com.sh.data.engine.domain.api.model.domain;

import com.sh.data.engine.domain.api.model.domain.rest.DataApiTaskParamDomain;
import com.sh.data.engine.domain.base.model.BaseDomain;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;
import java.util.List;

/**
 * @author : fuchen
 * @date : 2022/1/19 16:34
 */
@Data
@NoArgsConstructor
@SuperBuilder
public class DataApiDomain extends BaseDomain {

    //    @ApiModelProperty(value = "id")
//    private Long id;

    //    @ApiModelProperty(value = "0-向导模式 1-脚本模式 2-注册模式")
    private Integer apiType;

    private Long dirId;

    private Long indexId;

    //    @ApiModelProperty(value = "api名称")
    private String apiName;

    //    @ApiModelProperty(value = "状态0- 未发布 1-已发布")
    private Integer apiStatus;

    //    @ApiModelProperty(value = "api传输协议")
    private String apiProtocol;

    //    @ApiModelProperty(value = "api路径")
    private String apiPath;

    //    @ApiModelProperty(value = "api groupId")
    private Long apiGroupId;

    //    @ApiModelProperty(value = "api 描述")
    private String apiDesc;

    //    @ApiModelProperty(value = "数据源id")
    private Long datasourceId;

    private String datasourceName;

    //    @ApiModelProperty(value = "表名称")
    private String tableName;

    //    @ApiModelProperty(value = "发布时间")
    private Date publishTime;

    //    @ApiModelProperty(value = "参数列表,脚本模式、向导模式需要")
    private List<DataApiTaskParamDomain> apiParamEntityList;

    //    @ApiModelProperty(value = "脚本")
    private String apiScript;

    //    @ApiModelProperty(value = "返回例子")
    private String responseExample;

    //    @ApiModelProperty(value = "是否开启分页 0- 不开启 1开启")
    private Integer pageable;

    //    @ApiModelProperty(value = "测试API url")
    private String testApiUrl;

    //    @ApiModelProperty(value = "0-apiToken  1- userToken")
    private Integer authType;

    //    @ApiModelProperty(value = "生产 url")
    private String prodApiUrl;

    private DataApiRegisterDomain apiRegisterDomain;

    private Long projectId;

    private Long totalCount;

    private Long failCount;

    //    @ApiModelProperty(value = "用户名")
    private String userName;

    private Long successCount;

    private String datasourceInfo;

    private String apiMethod;

    private String apiGroup;

    private String indexGroup;

    private String indexName;

    private Integer isSecurity;
}
